<?

session_start();
//unset($_SESSION["passedJobId"]);
/**
* extract the passedJobId
*
*///$_POST["passJobId"] = "000011/09-2008,000008/09-2008";
$lstPassedJobId = explode(",", $_POST["passJobId"]);
$szPassedJobId  = sizeof($lstPassedJobId);

/**
* check if $_SESSION["passedJobId"]
* is null
*
* YES: add passedJobId
* NO : Create new entry of passedJobId
*
*/

$szJobId = sizeof($_SESSION["passedJobId"]);

if($szJobId == 0){
  
  $_SESSION["passedJobId"] = $lstPassedJobId;
}else{
  
  $szSesJobId = sizeof($_SESSION["passedJobId"]);
  
  for($idx = 0; $idx < $szSesJobId; $idx++){
    
    $idxJobId = $szSesJobId + $idx;
    
    $_SESSION["passedJobId"][$idxJobId] = $lstPassedJobId[$idx];
  }
}
var_dump($_SESSION["passedJobId"]);
?>